<template>
  <div>
    <div class="TS">
      <el-divider content-position="left">投诉信息</el-divider>
      <div>
        <FormPanel ref="formPanel" :list="formTxList" :cols="3" :labelWidth="100" formType="add" :isSubmitBtn="false" @formChange="formChangeHandle" />
      </div>
    </div>

    <div class="GD">
      <el-divider content-position="left">工单信息</el-divider>
      <div>
        <FormPanel ref="formPanel" :list="formGdList" :cols="3" :labelWidth="100" formType="add" :isSubmitBtn="false" @formChange="formChangeHandle" />
      </div>
    </div>

    <div class="CL">
      <el-divider content-position="left">车辆信息</el-divider>
      <div>
        <FormPanel ref="formPanel" :list="formCLList" :cols="3" :labelWidth="100" formType="add" :isSubmitBtn="false" @formChange="formChangeHandle" />
      </div>
    </div>
    <div class="Xxk">
      <LazyLoadTab v-model="assessActiveName" :tabMenus="assessMenus"></LazyLoadTab>
    </div>

    <div class="tab">
      <el-divider content-position="left">沟通记录</el-divider>
      <FilterTable
        ref="table"
        columnsRef="jzyAddRecordPanel2"
        :height="200"
        :columns="columns"
        :dataSource="list"
        :isColumnFilter="false"
        :isToperInfo="false"
        :isPagination="false"
        :onColumnsChange="columns => (this.columns = columns)"
      ></FilterTable>
    </div>

    <div class="ZT">
      <el-divider content-position="left">状态</el-divider>
      <div>
        <FormPanel ref="formPanel" :list="formZTList" :cols="3" :labelWidth="100" formType="add" :isSubmitBtn="false" @formChange="formChangeHandle" />
      </div>
    </div>
    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 99,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right'
      }"
    >
      <el-button @click="closeDialog">取 消</el-button>
    </div>
  </div>
</template>
<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  name: 'Tsmx',
  mixins: [dictionary],
  data() {
    return {
      formTxList: this.createFormTxList(),
      formGdList: this.createFormGdList(),
      formCLList: this.createFormClList(),
      formZTList: this.createFormZTList(),
      assessMenus: this.createAssessMenus(),
      assessActiveName: '投诉调查',
      columns: this.createTableColumns()
    };
  },
  mounted() {
    //  this.getFwhdXqList(this.rowsData);
  },
  methods: {
    createAssessMenus() {
      return [
        {
          title: '投诉调查',
          path: 'repair/business/customer/combination/TSdc',
          disabled: true,
          params: {}
        },
        {
          title: '事发原因',
          path: 'repair/business/customer/combination/SFyy',
          disabled: true,
          params: {}
        }
      ];
    },
    createTableColumns() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 70,
          sorter: true,
          render: props => {
            return <span>{props.row.index + 1}</span>;
          }
        },
        {
          title: '处理时间',
          dataIndex: '',
          sorter: true
        },
        {
          title: '处理人',
          dataIndex: '',
          sorter: true
        },
        {
          title: '处理结果',
          dataIndex: '',
          sorter: true
        },
        {
          title: 'OEM处理人',
          dataIndex: '',
          sorter: true
        },
        {
          title: '类型',
          dataIndex: '',
          sorter: true
        },
        {
          title: '状态',
          dataIndex: '',
          sorter: true
        },
        {
          title: '备注',
          dataIndex: '',
          sorter: true
        },
        {
          title: '联系人姓名',
          dataIndex: '',
          sorter: true
        },
        {
          title: '主叫号码',
          dataIndex: '',
          sorter: true
        },
        {
          title: '被叫号码',
          dataIndex: '',
          sorter: true
        },
        {
          title: '开始时间',
          dataIndex: '',
          sorter: true
        },
        {
          title: '结束时间',
          dataIndex: '',
          sorter: true
        }
      ];
    },
    createFormTxList() {
      return [
        {
          type: 'INPUT',
          label: '投诉编号',
          fieldName: '',
          placeholder: ''
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '投诉人姓名',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '投诉人手机',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '家庭电话',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '办公电话',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '投诉来源',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: 'OEM一级来源',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '投诉人性别',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '省份',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '城市',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '投诉大类',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '投诉小类',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '一级类别',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '二级类别',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '三级类别',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '四级类别',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: 'OEM投诉编号',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '目前状态',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '投诉单位',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '接单时间',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'CHECKBOX',
          label: '是否GDR报告',
          fieldName: ''
        },
        {
          type: 'INPUT',
          label: '来源网址/账号',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '驳回原因',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        }
      ];
    },
    createFormGdList() {
      return [
        {
          type: 'INPUT',
          label: '维修工单',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '开单时间',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '工单类别',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '服务顾问',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '送修人',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '送修人电话',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '送修人手机',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '责任技师',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        }
      ];
    },
    createFormClList() {
      return [
        {
          type: 'INPUT',
          label: '车牌号',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: 'VIN',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '发动机号',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '行驶里程',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '购车日期',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '车系',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '车型',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '购车时间',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '车主',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '车主性质',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '车主地址',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        }
      ];
    },
    createFormZTList() {
      return [
        {
          type: 'SELECT',
          label: '处理人',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '服务请求级别',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '被投诉部门',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '被投诉员工',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '回访结果',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '优先级',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: 'OEM到期时间',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'INPUT',
          label: '重新处理次数',
          fieldName: '',
          placeholder: '',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        },
        {
          type: 'SELECT',
          label: '结案状态',
          fieldName: '',
          placeholder: '请选择',
          itemList: this.createDictList('1278')
          // rules: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
        }
      ];
    }
  },
  closeDialog() {
    this.$emit('close', false);
  }
};
</script>
<style lang="scss" scoped></style>
